<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>12-算数运算符+-*/%</title>
	</head>
	<body>
		<script type="text/javascript">
			var x = 9;
			var y = 2;
			console.log(x+y);//11
			console.log(x-y);//7
			console.log(y-x);//-7
			console.log(x*y);//18
			console.log(x/y);//4.5
			console.log(x%y);//1
			
			/**
			 * 11 12-算数运算符.html:11:12
				7 12-算数运算符.html:12:12
				-7 12-算数运算符.html:13:12
				18 12-算数运算符.html:14:12
				4.5 12-算数运算符.html:15:12
				1
			 */
			
			/**
			 * 0.30000000000000004
			   是否正确:: false
			 */
			//浮点数
			var u = 0.1 + 0.2;
			console.log(u);
			var flag = u == 0.3;
			console.log("是否正确::",flag);
		</script>
		
	</body>
</html>
